package com.zjc.yohoshop.mvp.view.adapter;

import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zjc.yohoshop.R;
import com.zjc.yohoshop.bean.CategoryRightEntity;
import com.zjc.yohoshop.network.API;

public class CategoryRightAdapter extends BaseQuickAdapter<CategoryRightEntity.Values, BaseViewHolder> {
    public CategoryRightAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, CategoryRightEntity.Values item) {
        ImageView imageView = helper.getView(R.id.iv_item_category_right);
        Glide.with(helper.itemView.getContext()).load(API.BaseUrl + item.getImage_path()).into(imageView);
        helper.setText(R.id.tv_item_category_right, item.getName());
    }

}
